package com.starlink.model.util;

import com.starlink.model.dtomapper.StarPaintDtoMapper;
import com.starlink.model.domain.StarPaintDO;
import com.starlink.model.vo.StarPaintVO;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zhanghong
 */
public class StarPaintConvert {

    public static List<StarPaintVO> buildStarPaintVoList(List<StarPaintDO> starPaintDOList) {
        if (CollectionUtils.isEmpty(starPaintDOList)) {
            return Lists.newArrayList();
        }
        List<StarPaintVO> starPaintVOList = new ArrayList<>();
        for (StarPaintDO starPaintDO : starPaintDOList) {
            starPaintVOList.add(StarPaintDtoMapper.INSTANCE.do2VO(starPaintDO));
        }

        return starPaintVOList;
    }
}
